package 多线程.单例模式.mySingleton;

//饿
public class Singleton {
    private static Singleton single = new Singleton();  //直接创建

    public Singleton getInstance() {
        return single;
    }

    private Singleton() {}  //设为私有, 不允许创建实例
}
